package com.xxxx.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.server.pojo.Admin;
import com.xxxx.server.pojo.ReceiveChangePwdParams;
import com.xxxx.server.rest.RespBean;
import com.xxxx.server.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhoubin
 * @since 2020-10-15
 */
public interface IAdminService extends IService<Admin> {

	/**
	 * 登录
	 * @param username
	 * @param password
	 * @return
	 */
	RespBean login(String username, String password, String code, HttpServletRequest request);

	/**
	 * 根据用户名获取用户信息
	 * @param username
	 * @return
	 */
	Admin getUserByUsername(String username);

	/**
	 * 查询聊天人员
	 * @param s
	 * @return
	 */
	List<Admin> selectAdminList(String s);

    List<Role> getRoles(Integer id);

    RespBean updateMyPic(Integer id,String userFace);

	RespBean updateAdminInfo(Admin admin);

    RespBean changePwd(ReceiveChangePwdParams params);


	//操作员信息的查询
	List<Admin> selectAdminInfo(String keywords);


	//查询操作员的角色的信息
	 List<Role> selectAdminRoleInfo();


	 //修改操作员的状态
	Integer enableChange(Map<String,Object>admin);


	//用户的启用和禁用
	public RespBean updateEnabledById(Map<String, Object> admin);


	//管理员的删除
	RespBean deleteAdminById(Integer id);



	//修改操作员的角色
	RespBean updateRolesById(Integer adminId, Integer[] rids);


}
